Attendance systems built around manual roll calls or RFID and biometric cards still fall prey to proxy attendance, take up too much of an instructor\'s time, and leave a paper trail that is hard to audit after the fact — a problem that only gets worse as class sizes grow and the time faculty can spend verifying each student shrinks. SmartAttend was built to close these gaps. It is a Streamlit-based attendance platform that pairs CNN-driven face recognition with CNN-driven liveness detection and a session-aware decision engine, so that a printed photo or a phone held up to the camera cannot be marked present in place of the real student. Faces are located using a Multi-task Cascaded Convolutional Network (MTCNN), with an OpenCV Haar-cascade detector kept on hand as a fallback; identity is then confirmed by a trained CNN classifier, backed up by a cosine-similarity matcher when no trained model is available; and a dedicated liveness CNN screens out printed-photo and screen-replay spoofing attempts. Attendance is only recorded when four things line up at once — a claimed roll number, a recognized face, a passed liveness check, and an open class session — and every attempt, whether it succeeds or not, is written to a log that can be reviewed later, with mismatches routed into a separate exception queue. This paper walks through the system\'s architecture, how the face and liveness models were trained, the reasoning behind the dual-logging and role-based-access design, and a local evaluation in which the liveness model hit 1.0000 across accuracy, precision, recall, F1-score, and ROC-AUC on a 35-sample test set once its threshold was recalibrated from 0.30 to 0.4947. The paper closes by discussing what a small evaluation set can and can\'t tell us, how the system is deployed on managed Postgres and S3-backed infrastructure, and where the project could go if it were to grow into a full multi-classroom platform.
Introduction
SmartAttend is an AI-based attendance management system that combines face recognition with liveness detection (anti-spoofing) to ensure that only the actual enrolled student, physically present in class, is marked as present. Traditional attendance methods such as roll calls, sign-in sheets, RFID cards, and barcode systems cannot verify a student's physical presence, making them vulnerable to proxy attendance. Even conventional face-recognition systems can be deceived using printed photographs or images displayed on mobile phones. SmartAttend addresses these shortcomings by verifying both identity and liveness before recording attendance.
The system operates through two parallel Convolutional Neural Network (CNN) pipelines: one for face recognition and another for liveness detection. Attendance is recorded only when four conditions are satisfied simultaneously: the claimed roll number matches the recognized face, the person is verified as live, and an active class session exists. Successful attendance records and failed verification attempts are stored separately, improving transparency, security, and administrative auditing.
Literature Review
Previous research on automated attendance systems focuses on three major areas:
Face Detection and Recognition: Traditional methods such as Viola–Jones Haar Cascade are lightweight but less robust, while modern methods like MTCNN provide more accurate face detection and landmark extraction. Face recognition is commonly performed using CNN-based classifiers or feature embedding methods.
Liveness Detection: Anti-spoofing techniques include texture-based methods and CNN-based models. CNN approaches generally provide better performance in distinguishing live faces from printed or replayed images.
Attendance System Design: Most existing systems integrate face detection and recognition but often omit liveness detection, session management, and audit logging, leaving them susceptible to spoofing and difficult to verify afterward.
SmartAttend integrates all these components into a single deployable application featuring MTCNN with Haar Cascade fallback, CNN-based recognition, CNN-based liveness detection, cosine similarity matching, session-aware verification, and dual audit logging.
Research Gap
Existing attendance systems typically suffer from three limitations:
Many perform face recognition without anti-spoofing, making them vulnerable to presentation attacks.
Systems with liveness detection often fail to explain how decision thresholds are selected, affecting reliability.
Most academic prototypes lack practical deployment features such as role-based access, session-aware attendance, and comprehensive audit trails.
SmartAttend addresses these gaps by integrating recognition and liveness detection into a unified decision engine, calibrating liveness thresholds using ROC analysis, and implementing session-based verification with separate logs for successful and suspicious attendance attempts.
Research Objectives
The project aims to:
Develop a robust face detection and recognition system using MTCNN, Haar Cascade, CNN classifiers, and cosine similarity matching.
Train a CNN-based liveness detection model capable of distinguishing live faces from spoof attacks.
Create a session-aware and role-based attendance verification system.
Maintain separate logs for successful attendance and failed verification attempts.
Evaluate the liveness model using metrics such as accuracy, precision, recall, F1-score, ROC-AUC, false acceptance rate, and false rejection rate.
System Design and Methodology
SmartAttend is implemented as a Streamlit web application with a modular Python architecture. The system is hosted on Hugging Face Spaces, uses a Neon PostgreSQL database for attendance records, and stores enrolled facial images in Amazon S3 storage. During attendance, the system detects a face using MTCNN (with Haar Cascade as a backup), recognizes the student's identity using a CNN model and cosine similarity, verifies liveness through a dedicated CNN, and records attendance only when all verification conditions are satisfied. This integrated approach provides a secure, reliable, and practical attendance management solution that minimizes proxy attendance and improves record accuracy.
Conclusion
This paper described SmartAttend, an attendance system that pairs MTCNN/Haar-cascade face detection with CNN-based recognition (backed by a cosine-similarity fallback) and CNN-based liveness detection with an ROC-calibrated threshold, wrapped in a session-aware, role-based, dual-logged decision engine.
The goal throughout was to answer a slightly harder question than most attendance systems ask — not just whether someone was marked present, but whether the enrolled student was actually there and the scan itself was genuine, for that specific class session. In local testing, the liveness model reached 1.0000 across accuracy, precision, recall, F1-score, and ROC-AUC on a 35-sample set after its threshold was recalibrated, though that result should be read as a local snapshot given how small the test set was. The architecture supports both local development (SQLite, local storage) and a managed hosted deployment (PostgreSQL, S3, Hugging Face Spaces, Docker, CI/CD), which gives SmartAttend room to grow from an academic prototype toward a more production-ready biometric attendance platform, with further work still needed on dataset diversity, larger-scale evaluation, and institutional rollout.
References
[1] P. Viola and M. Jones, \"Rapid object detection using a boosted cascade of simple features,\" in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), 2001, pp. 511-518.
[2] K. Zhang, Z. Zhang, Z. Li, and Y. Qiao, \"Joint face detection and alignment using multi-task cascaded convolutional networks,\" IEEE Signal Process. Lett., vol. 23, no. 10, pp. 1499-1503, 2016.
[3] F. Schroff, D. Kalenichenko, and J. Philbin, \"FaceNet: A unified embedding for face recognition and clustering,\" in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), 2015, pp. 815-823.
[4] Z. Boulkenafet, J. Komulainen, and A. Hadid, \"Face anti-spoofing based on color texture analysis,\" in Proc. IEEE Int. Conf. Image Processing (ICIP), 2015, pp. 2636-2640.
[5] Y. Atoum, Y. Liu, A. Jourabloo, and X. Liu, \"Face anti-spoofing using patch and depth-based CNNs,\" in Proc. IEEE Int. Joint Conf. Biometrics (IJCB), 2017, pp. 319-328.
[6] S. Kadry and M. Smaili, \"A design and implementation of a wireless iris recognition attendance management system,\" Inf. Technol. Control, vol. 36, no. 3, pp. 323-329, 2007.
[7] N. Sabharwal and S. Aggarwal, \"Smart attendance monitoring system using face recognition,\" Int. J. Comput. Appl., vol. 178, no. 45, pp. 1-6, 2019.
[8] M. Whitman and H. Mattord, Principles of Information Security, 6th ed. Boston, MA, USA: Cengage Learning, 2017.